from django.conf.urls.defaults import *
import os
from django.contrib import admin
admin.autodiscover()


# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
site_media=os.path.dirname(globals()["__file__"])+'/site_media'
usericon=os.path.dirname(globals()["__file__"])+'/usericon'

urlpatterns = patterns('',
    # Example:
    # (r'^goplay/', include('goplay.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
    url(r'^$', 'goplay.account.views.index',name="index"),
    url(r'^index/$', 'goplay.account.views.index',name="accounts_index"),
    url(r'^register/$', 'goplay.account.views.register',name="register"),
    url(r'^login/$', 'goplay.account.views.login',name="login"),
    url(r'^logout/$', 'goplay.account.views.logout',name="logout"),
    url(r'^wlogin/$','goplay.sinaweibo.oauth_views.login',name='weibologin'),
    url(r'^accounts/$','goplay.account.views.accountManage',name='accountManage'),
    url(r'^accounts/user_icon/$','goplay.account.views.user_icon',name='userIcon'),
    url(r'^accounts/friends/$','goplay.account.views.friends_manage',name='friendsManage'),
    url(r'^accounts/changepassword/$','goplay.account.views.change_password',name='changepassword'),
    url(r'^delFriend/$','goplay.account.views.delFriend',name='delFriend'),
    url(r'^login_check/$','goplay.sinaweibo.oauth_views.login_check',name="logincheck"),
    #url(r'^wlogout/$','sinaweibo.oauth_views.logout',name="wlogout"),
    url(r'^addActivity/$','goplay.activity.views.AddActivity',name="addactivity"),
    url(r'^invite/$','goplay.sinaweibo.views.sendMessages',name='sendmessage'),
    url(r'^activity/(\d+)/(\w+)/$','goplay.activity.views.activityMember',name='activitymember'),
    url(r'^delActivity','goplay.activity.views.delActivity',name='delactivity'),
    url(r'^activity/(\d+)/$','goplay.activity.views.activityInfo',name='activityInfo'),
    url(r'^activitys/people/(\d+)/$','goplay.activity.views.people',name='people'),
    #url(r'^activitys/people/(.*)/$','activity.views.people_name',name='people_name'),
    url(r'^addSuggestion/$','goplay.activity.views.addSuggestion',name='addsuggestion'),
    url(r'^delSuggestion/$','goplay.activity.views.delSuggestion',name='addsuggestion'),
    url(r'^suiyu/$','goplay.activity.views.suiyu',name='suiyu'),
    url(r'^tags/$','goplay.activity.views.tags',name='tags'),
    url(r'^search/(\w+)/$','goplay.activity.tagSearch.tags_search',name='tagsearch'),
    url(r'^getCityList/$','goplay.account.views.city_list',name='getCityList'),
    url(r'^notice/$','goplay.account.views.notice',name='inbox'),
    url(r'^addfriend/$','goplay.account.views.add_friend',name='addFriend'),
    url(r'^acceptfriend/$','goplay.account.views.accept_friend',name='acceptFriend'),
    url(r'^ignorefriend/$','goplay.account.views.ignore_friend',name='ignoreFriend'),
    
    (r'^site_media/css/(?P<path>.*)$','django.views.static.serve',{'document_root':site_media+'/css' }), 
    (r'^site_media/js/(?P<path>.*)$','django.views.static.serve',{'document_root':site_media +'/js'}),
    (r'usericon/(?P<path>.*)$','django.views.static.serve',{'document_root':usericon}),
    #(r'^get_weibo$','sinaweibo.views.get_weibo'),
)
